//
//  DrawkerViewController.m
//  PhoenixNews
//
//  Created by dllo on 16/1/22.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "DrawkerViewController.h"
#import "CustomView.h"
@interface DrawkerViewController ()
@property (nonatomic, retain) UITableView *tableView;
@end

@implementation DrawkerViewController
- (void)dealloc {
    [_tableView release];
    [super dealloc];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    CGRect rect = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
    NSLog(@"W:%f, H:%f", rect.size.width, rect.size.height);
    UIImageView *imageleft = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"00.jpg"]];
    imageleft.frame = rect;
    UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(20, 20, 60, 40)];
    textField.text = @"呵呵";
    [imageleft addSubview:textField];
    [self.view addSubview:imageleft];
    
    UIView *contentView = [[UIView alloc]initWithFrame:rect];
    
    UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"cat.jpg"]];
    imageView.frame = rect;
    [contentView addSubview:imageView];
    
    CustomView * customView = [[CustomView alloc]initWithView:contentView parentView:self.view];
    [[customView layer] setShadowOffset:CGSizeMake(0, 0)];
    [[customView layer] setShadowRadius:20];
    [[customView layer] setShadowOpacity:100];
    [[customView layer] setShadowColor:[UIColor blackColor].CGColor];
    
    [self.view addSubview:customView];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
